![]() |
GetControlData |
||||
Header: | Controls.h | Carbon status: | Supported | |
Obtains control-specific data.
OSErr GetControlData ( ControlRef inControl, ControlPartCode inPart, ResType inTagName, Size inBufferSize, void *inBuffer, Size *outActualSize );
A handle to the control to be examined.
The part code of the control part from which data is to be obtained; see
A constant representing the control-specific data you wish to obtain; see the data tag constants in the “Control Manager Constants” section.
The size (in bytes) of the data pointed to by the inBuffer parameter. For variable-length control data, pass the value returned in the outMaxSize parameter of GetControlDataSize in the inBufferSize parameter. The number of bytes must match the actual data size.
On input, a pointer to a buffer allocated by your application. On return, the buffer contains a copy of the control-specific data. If you pass NULL on input, it is equivalent to calling GetControlDataSize. The actual size of the control-specific data will be returned in the outActualSize parameter. For variable-length data, the number of bytes must match the actual data size.
On input, a pointer to a Size value. On return, the value is set to the actual size of the data.
A result code. The result code errDataNotSupported indicates that the inTagName parameter is not valid.
The GetControlData function will only copy the amount of data specified in the inBufferSize parameter, but will tell you the actual size of the buffer so you will know if the data was truncated.
This function is available with Appearance Manager 1.0 and later.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)